package com.service;

import com.mapper.goodsMapper;
import com.pojo.Category;
import com.pojo.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author:周鹏
 * @date: 2020/10/23 14:48
 * @description:商品service层实现
 */

@Service
public class GoodService {

    @Autowired
    private goodsMapper goodsmapper;

    public List<Goods> goodsList(){
        return goodsmapper.findAll();
    }
    public int add_goods(Goods goods){
        return goodsmapper.add_goods(goods);

    }
    public Goods findonegood(Integer id){
        return goodsmapper.findOne(id);

    }
    public int update_goods(Goods good){
        return goodsmapper.update_goods(good);
    }
}
